/**
 * Copyright 2015 Software innovation and R & D center. All rights reserved.
 * File Name: SysLogin.java
 * Encoding UTF-8
 * Version: 0.0.1
 * History:	2015年1月21日
 */
package com.sirdc.modules.sys.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.sirdc.modules.core.entity.StringEntity;

/**
 * 用户登录表
 * @version Revision: 0.0.1
 */
@Entity
@Table(name = "t_sys_login")
@DynamicUpdate//动态更新
@DynamicInsert//动态插入
public class SysLogin extends StringEntity {

	private static final long serialVersionUID = -2310383761651689412L;

	private String username;//用户名

	private String password;//密码
	
	private String saltKey;//加密钥匙

	private String state;//帐号状态
	
	private String deptId;//部门编号
	
	private String roleId;//角色编号 ->小类id

	@Column(unique = true)
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * @return the deptId
	 */
	@Column(name="dept_sys_id")
	public String getDeptId() {
		return deptId;
	}

	/**
	 * @param deptId the deptId to set
	 */
	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	/**
	 * @return the roleId
	 */
	public String getRoleId() {
		return roleId;
	}

	/**
	 * @param roleId the roleId to set
	 */
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	/**
	 * 获取密码
	 * @return
	 */
	@Column(length = 100)
	public String getPassword() {
		return password;
	}

	/**
	 * 设置密码
	 * @param password
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * 获取加密钥匙
	 * @return the saltKey
	 */
	public String getSaltKey() {
		return saltKey;
	}

	/**
	 * 设置加密钥匙
	 * @param saltKey the saltKey to set
	 */
	public void setSaltKey(String saltKey) {
		this.saltKey = saltKey;
	}

	/**
	 * @return the state
	 */
	public String getState() {
		return state;
	}

	/**
	 * @param state the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}
}